    var show_goods_layer = 'order_goods_layer';
    var goods_hash_table = new Object;
    var timer = new Object;

    function bind_order_event()
    {
        var order_seq = 0;
        while(true)
        {
            var order_sn = Utils.$('order_'+order_seq);
								
            if (order_sn)
            {
                order_sn.onmouseover = function(e)
                {
                    try
                    {
                        window.clearTimeout(timer);
                    }
                    catch(e)
                    {
                    }
                    var order_id = Utils.request(this.name, 'id');
					var goods_id = Utils.request(this.name, 'goods_id');
                    show_order_goods(e, order_id, goods_id, show_goods_layer);
                }
                order_sn.onmouseout = function(e)
                {
                    hide_order_goods(show_goods_layer)
                }
                order_seq++;
            }
            else
            {
                break;
            }
        }
    }
    
    if (Browser.isIE)
    {
        window.attachEvent("onload", bind_order_event);
    }
    else
    {
        window.addEventListener("load", bind_order_event, false);
    }
    
    function create_goods_layer(id)
    {
        if (!Utils.$(id))
        {
            var n_div = document.createElement('DIV');
            n_div.id = id;
            n_div.className = 'order-goods';
            document.body.appendChild(n_div);
            Utils.$(id).onmouseover = function()
            {
                window.clearTimeout(window.timer);
            }
            Utils.$(id).onmouseout = function()
            {
                hide_order_goods(id);
            }
        }
        else
        {
            Utils.$(id).style.display = '';
        }
    }

    function show_order_goods(e, order_id, goods_id, layer_id)
    {
        create_goods_layer(layer_id);
        $layer_id = Utils.$(layer_id);
        $layer_id.style.top = (Utils.y(e) + 12) + 'px';
        $layer_id.style.left = (Utils.x(e) + 12) + 'px';
        if (typeof(goods_hash_table[order_id]) == 'object')
        {
            response_goods_info(goods_hash_table[order_id]);
        }
        else
        {
            //$layer_id.innerHTML = loading;
			var url = location.href.substring((location.href.lastIndexOf("/")) + 1);
			var func = 'pcs_order';
			if(url.replace(/^\s*|\s*$/g, "").length != 0){
			   var reg_cf_url = /^\S+confirm\S+$/g;
			   var reg_ch_url = /^\S+check\S+$/g;
			   var reg_ls_url = /^\S+loss\S+$/g;
			   var reg_rt_url = /^\S+rectify\S+$/g;
			   var reg_rn_url = /^\S+return\S+$/g;
			   if(reg_cf_url.exec(url))  func='confirm_order';	
			   else if(reg_ch_url.exec(url)) func='check_order';
			   else if(reg_ls_url.exec(url)) func='loss_order';
			   else if(reg_rt_url.exec(url)) func='rectify_order';
			   else if(reg_rn_url.exec(url)) func='return_order'
			}
            Ajax.call('purchase_order.php?is_ajax=1&act=show_order_goods_list&func='+func, 'order_id='+order_id+'&goods_id='+goods_id, response_goods_info , 'GET', 'JSON');
        }
    }

    function hide_order_goods(layer_id)
    {
        $layer_id = Utils.$(layer_id);
        window.timer = window.setTimeout('$layer_id.style.display = "none"', 500);
    }

    function response_goods_info(result)
    {
        if (result.error > 0)
        {
            alert(result.message);
            hide_order_goods(show_goods_layer);
            return;
        }
        if (typeof(goods_hash_table[result.content[0].order_id]) == 'undefined')
        {
            goods_hash_table[result.content[0].order_id] = result;
        }
        Utils.$(show_goods_layer).innerHTML = result.content[0].str;
    }